package com.ptl.bp.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "error_log")
@Schema(description = "错误日志实体")
public class ErrorLogEntity extends BaseEntity {

    @Column(nullable = false)
    @Schema(title = "错误类型", example = "app|vue|api|promise")
    private String type;

    @Column(columnDefinition = "TEXT", nullable = false)
    @Schema(title = "错误信息")
    private String message;

    @Column(columnDefinition = "TEXT")
    @Schema(title = "错误堆栈")
    private String stackTrace;

    @Column
    @Schema(title = "客户端平台信息")
    private String platform;

    @Column(name = "client_ip")
    @Schema(title = "客户端IP")
    private String clientIp;

}